module.exports = {
	/**
	 * 查询角色列表
	 * @url 前端调用的url参数地址
	 * data 请求参数 说明
	 * @param {Number}         pageIndex 当前页码
	 * @param {Number}         pageSize  每页显示数量
	 * @param {Array<Object>}  sortRule  排序规则
	 * @param {object}         formData  查询条件数据源
	 * @param {Array<Object>}  columns   查询条件规则
	 * res 返回参数说明
	 * @param {Number}         code      错误码，0表示成功
	 * @param {String}         msg       详细信息
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid } = data;
		let res = { code: 0, msg: '' };
		// 业务逻辑开始-----------------------------------------------------------
		let user = await vk.baseDao.count({
			dbName: 'uni-id-users',
		});
		res.user = user
		let cover = await vk.baseDao.count({
			dbName: 'bus-wx-cover',
		});
		res.cover = cover
		let down = await vk.baseDao.count({
			dbName: 'bus-wx-order',
		});
		res.down = down
		let change = await vk.baseDao.count({
			dbName: 'bus-wx-tip-order',
		});
		res.change = change
		
		
		let wx = await vk.baseDao.count({
			dbName: 'uni-id-users',
			whereJson: {
				origin: 'wx'
			}
		});
		res.wx = wx
		let qq = await vk.baseDao.count({
			dbName: 'uni-id-users',
			whereJson: {
				origin: 'qq'
			}
		});
		res.qq = qq
		let tt = await vk.baseDao.count({
			dbName: 'uni-id-users',
			whereJson: {
				origin: 'tt'
			}
		});
		res.tt = tt
		let ks = await vk.baseDao.count({
			dbName: 'uni-id-users',
			whereJson: {
				origin: 'ks'
			}
		});
		res.ks = ks
		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}

}